﻿using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
namespace AnyOffice.general.system.workflow.flow_form
{

    public partial class index : ModulePage
    {        
        public string GetFlowTypeNames(int formId)
        {
            string str = string.Empty;
            DataTable table = new FlowTypeDao().SelectByFormId(base.Conn, formId);
            if (table.Rows.Count > 0)
            {
                for (int i = 0; i < table.Rows.Count; i++)
                {
                    string str2 = str;
                    str = (str2 + "<u title=\"流程名称：" + table.Rows[i]["FlowName"].ToString() + "&#13;&#10;流程类型：" + table.Rows[i]["SortName"].ToString() + "\">") + table.Rows[i]["FlowName"].ToString() + "</u>";
                    if (i < (table.Rows.Count - 1))
                    {
                        str = str + "</a>&nbsp;,&nbsp;";
                    }
                }
            }
            return str;
        }
        

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                DataTable table = new FlowFormTypeDao().SelectAll(base.Conn);
                if (table.Rows.Count > 0)
                {
                    this.rptFlowFormType.DataSource = table;
                    this.rptFlowFormType.DataBind();
                }
                else
                {
                    this.litMessage.Text = base.ShowMessage("暂无表单");
                }
            }
        }
       
    }
}

